package com.itao;

public class Test {


    private volatile static Test instance;


    public static Test getInstance() {

        if (instance == null) {
            synchronized (Test.class) {
                if (instance == null) {
                    instance = new Test();
                }
            }
        }
        return instance;
    }


    private volatile static boolean flag = true;
    public static void main(String[] args) throws InterruptedException {
        int i = 1;
        int j = 2;

    }

}
